package fr.unice.miage.xml;

import java.sql.Date;
import java.util.ArrayList;



public class Anime {
	protected int id;
	protected String nom="";
	protected Date Sortie;
	protected int agemin;
	protected int episodes;
	protected String image;
	protected String genre;
	protected String origine;
	protected ArrayList<Production> Productions = new ArrayList<Production>();	
	protected static ArrayList<Anime> Animes= new ArrayList<Anime>();
		
	public Anime() {}
	
	public Anime(int id, String nom, String genre,int episodes, Date Sortie, int agemin,String origine,String image) {
		this.id = id;
		this.nom = nom;
		this.episodes=episodes;
		this.Sortie = Sortie;
		this.agemin = agemin;
		this.image = image;
		this.genre = genre;
		this.origine=origine;
		Animes.add(this);
	}
	public static void removeAnimes(){
		Animes.clear();
	}
	
	public void addProduction(Production p){
		Productions.add(p);
	}
	public ArrayList<Production> getProduction(){
		return Productions;
	}
	
	public static ArrayList<Anime> getAnimes(){
		return Animes;
	}
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}


	public Date getSortie() {
		return Sortie;
	}

	public void setDateSortie(Date Sortie) {
		this.Sortie = Sortie;
	}
	public int getEpisodes() {
		return episodes;
	}

	public void setEpisodes(int episodes) {
		this.episodes = episodes;
	}
	public int getAgemin() {
		return agemin;
	}

	public void setAgemin(int agemin) {
		this.agemin = agemin;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public String getGenre() {
		return genre;
	}

	public void setGenre(String genre) {
		this.genre = genre;
	}

	public String getOrigine() {
		return origine;
	}

	public void setOrigine(String origine) {
		this.origine = origine;
	}
}